package com.wjk.kylin.core.exception;

import cn.hutool.http.HttpStatus;
import lombok.Data;

/**
 * @author wangjkui
 * @description 业务异常
 * @date 2020/5/22
 */
@Data
public class BusinessException extends RuntimeException {
    private Integer code;
    private String msg;

    public BusinessException(String msg) {
        this(HttpStatus.HTTP_INTERNAL_ERROR,msg);//500
    }

    public BusinessException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }
}
